// JavaScript Document

//初始化
function init2(zhi,zhi2){
	var shuzu = zhi.split(".");
	var zu_zhi = zhi2.split(".");
	for(i=0;i<shuzu.length;i++){
		var huoqu = document.getElementById(shuzu[i]).value;
		aa = zu_zhi[i];
		if(huoqu == ""){
			document.getElementById(shuzu[i]).value = aa;
		}
	}
}
//验证用户名
function checkNameFocus(id){
	var name = document.getElementById(id);
	if(name.value=="手机号/邮箱" || name.value=="用户名"){
		name.value="";
	}
}
function checkNameBlur(id){
	var name = document.getElementById(id);
	if(name.value==""){
		if(id == 'qname'){
			name.value="用户名";
		}else{
			name.value="手机号/邮箱";
		}		
	}
}
//验证密码文本框
function checkPwdFocus(pat,pass){
	var pwd = document.getElementById(pass);
	var pwdText = document.getElementById(pat);
	if(pwdText.value == "密码"){
		pwd.style.display="block";
		pwdText.style.display="none";
	}
	pwd.focus();
}
//密码框失去焦点
function checkPwdBlur(pat,pass){
	var pwdText = document.getElementById(pat);
	var pwd = document.getElementById(pass);
	if(pwd.value==""){	
		pwdText.style.display="block";
		pwd.style.display="none";
	}
}

//搜索中输入关键词
function checkGuanJianCiFocus(id){
	var ci = document.getElementById(id);
	if(ci.value=="请输入关键词"){
		ci.value="";
	}
}
function checkGuanJianCiBlur(id){
	var ci = document.getElementById(id);
	if(ci.value==""){
		ci.value="请输入关键词";
	}
}

//绑定账号
function checkFocus(id,zhi){
	var ci = document.getElementById(id);
	if(ci.value == zhi){
		ci.value="";
	}
}
function checkBlur(id,zhi){
	var ci = document.getElementById(id);
	if(ci.value == ""){
		ci.value = zhi;
	}
}

//简介切换
function jianjieOver(bg,tu,zi) {
	var beijing = document.getElementById(bg);
	var icon = document.getElementById(tu);
	var wenzi = document.getElementById(zi);

	beijing.style.backgroundColor="#1379BF";
	icon.style.background="url(http://www.sky9001.com/style/recruit/pc/images/yejiao_dui.png) 0 0 no-repeat";
	wenzi.style.color="#FFF";
}

function jianjieOut(bg,tu,zi) {
	var beijing = document.getElementById(bg);
	var icon = document.getElementById(tu);
	var wenzi = document.getElementById(zi);

	beijing.style.backgroundColor="#FFF";
	icon.style.background="url(http://www.sky9001.com/style/recruit/pc/images/yejiao_dui.png) -40px 0 no-repeat";
	wenzi.style.color="#1379BF";
}

//简介服务项目切换
function fuwuOver(bg,tu,zi) {
	var beijing = document.getElementById(bg);
	var icon = document.getElementById(tu);
	var wenzi = document.getElementById(zi);

	beijing.style.backgroundColor="#1379BF";
	icon.style.background="url(http://www.sky9001.com/style/recruit/pc/images/yejiao_dui.png) 0 -40px no-repeat";
	wenzi.style.color="#FFF";
}

function fuwuOut(bg,tu,zi) {
	var beijing = document.getElementById(bg);
	var icon = document.getElementById(tu);
	var wenzi = document.getElementById(zi);

	beijing.style.backgroundColor="#FFF";
	icon.style.background="url(http://www.sky9001.com/style/recruit/pc/images/yejiao_dui.png) -40px -40px no-repeat";
	wenzi.style.color="#1379BF";
}

//简介专家切换
function zhuanjiaOver(bg,tu,zi) {
	var beijing = document.getElementById(bg);
	var icon = document.getElementById(tu);
	var wenzi = document.getElementById(zi);

	beijing.style.backgroundColor="#1379BF";
	icon.style.background="url(http://www.sky9001.com/style/recruit/pc/images/yejiao_dui.png) 0 -75px no-repeat";
	wenzi.style.color="#FFF";
}

function zhuanjiaOut(bg,tu,zi) {
	var beijing = document.getElementById(bg);
	var icon = document.getElementById(tu);
	var wenzi = document.getElementById(zi);

	beijing.style.backgroundColor="#FFF";
	icon.style.background="url(http://www.sky9001.com/style/recruit/pc/images/yejiao_dui.png) -40px -75px no-repeat";
	wenzi.style.color="#1379BF";
}